from objprint import objprint
from DrissionPage import ChromiumPage
from DrissionPage import WebPage
from DrissionPage.commons.by import By
# 创建页面对象
page = WebPage()
page = WebPage("d")
page.get('https://www.bilibili.com/v/popular/rank/all')
items = page.eles((By.XPATH,'//ul[@class="rank-list"]/li'))
print(len(items))
for item in items:
    print(item)